package com.sailfish.springbootdemo.controller.db7;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db7.TbFlowDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/TbFlowDetail")
public class TbFlowDetailController {

    @Autowired
    private TbFlowDetailService tbFlowDetailService;

    @RequestMapping("/getApproverUserByDepartId")
    public Result getApproverUserByDepartId(@RequestBody String data) {

        return tbFlowDetailService.getApproverUserByDepartId(data);
    }

    @RequestMapping("/getFlowListByType")
    public Result getFlowListByType(@RequestBody String data) {
        return tbFlowDetailService.getFlowListByType(data);
    }

    @RequestMapping("/insertFlow")
    public Result insertFlow(@RequestBody String data) {
        return tbFlowDetailService.insertFlow(data);
    }

    @RequestMapping("/updateFlow")
    public Result updateFlow(@RequestBody String data) {
        return tbFlowDetailService.updateFlow(data);
    }

    @RequestMapping("/deleteFlow")
    public Result deleteFlow(@RequestBody String data) {
        return tbFlowDetailService.deleteFlow(data);
    }

    @RequestMapping("/getFlowList")
    public Result getFlowList(@RequestBody String data) {
        return tbFlowDetailService.getFlowList(data);
    }

}
